#!/bin/bash
echo ">>>>>>>>>> 使用apt安装pip3......"
sudo -S apt install python3-pip

echo ">>>>>>>>>> 配置pip源为阿里源......"
mkdir ~/.pip
cat > ~/.pip/pip.conf <<EOF
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
EOF

echo ">>>>>>>>>> pip upgrade......"
python3 -m pip install --upgrade pip

echo ">>>>>>>>>> 使用pip3安装 pyrealsense2 numpy opencv-python scikit-learn......"
pip3 install pyrealsense2 numpy opencv-python scikit-learn

echo ">>>>>>>>>> 建立软连接，链接手眼标定文件结果到config.yaml......"
vision_rocr6_config=$(rospack find vision_rocr6)/config
file_name=eyeToHand_calibration.yaml
echo 自动搜索到配置文件路径： $vision_rocr6_config/$file_name
ln -s $vision_rocr6_config/$file_name config.yaml
